package com.ys.service.base.impl;


import com.ys.entity.base.TsBatchImportLog;
import com.ys.enume.base.TsBatchImportLogEnum;
import com.ys.mapper.base.TsBatchImportLogMapper;
import com.ys.service.base.TsBatchImportLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("tsBatchImportLogService")
public class TsBatchImportLogServiceImpl implements TsBatchImportLogService {
	
	@Autowired
	private TsBatchImportLogMapper tsBatchImportLogMapper;
	
	@Override
	public void updateErrorReason(TsBatchImportLog tsBatchImportLog, String failReason) {
        TsBatchImportLog logByUpdate = new TsBatchImportLog();
        logByUpdate.setId(tsBatchImportLog.getId());
        logByUpdate.setImportState(TsBatchImportLogEnum.ImportState.FAIL.value);
        logByUpdate.setFailReason(failReason);
        tsBatchImportLogMapper.update(logByUpdate);
	}
	


}
